﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Input;
using System.ComponentModel;

namespace Devmil.MVVM.Sample.ViewModel
{
    public class ContactViewModelTraditional : INotifyPropertyChanged
    {
        private string _Name;
        
        public string Name
        {
            get
            {
                return _Name;
            }
            set
            {
                bool changed = value != _Name;
                _Name = value;
                if (changed)
                    OnPropertyChanged("Name");
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        private void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}
